import React, { useContext } from 'react';
import Context from './Context';
import { Button } from 'antd';
export default function Index (){
    const {count,setCount} = useContext(Context)
    return <div>
        <div>{count}</div>
        <Button type='primary' onClick={()=>setCount("add")}>+1</Button>
        <Button type='danger' onClick={()=>setCount()}>-1</Button>
    </div>
}